<template>
    <div class="goods-desc-container">
        <h3>{{ goodsDesc.title }}</h3>
        <hr>
        <div class="goods-desc-html" v-html="goodsDesc.content"></div>
    </div>
</template>
<script>
    export default {
        data(){
            return {
                goodsDesc: null
            }
        },
        created(){
            this.getGoodsDesc()
        },
        methods: {
            getGoodsDesc(){
                this.$http
                    .get('api/goods/getDesc/' + this.$route.params.id)
                    .then(result => {
                        if (result.body.status === 0) {
                            this.goodsDesc = result.body.message[0]
                        }
                    })
            }
        }
    }
</script>
<style lang="scss">
.goods-desc-container{
    padding: 4px;
    h3{
        font-size: 16px;
        color: #226aff;
        text-align: center;
        margin: 15px 0;
    }
    .goods-desc-html{
        img {
            width: 100%
        }
    }
    
}
</style>

